package my.project.dao;

import my.project.entity.UserEntity;
import my.spring.annotation.Query;
import my.spring.annotation.Repository;
import my.spring.db.MyDao;

import java.util.List;

/**
 * 用户数据库操作接口
 */
@Repository
public interface UserDao extends MyDao<UserEntity, Long> {
    @Query("select * from users where username=?")
    UserEntity findOneByUserName(String username);

    @Query("select * from users")
    List<UserEntity> findAll();

}
